{extend name="public:_base" /}
{block name="css"}
{load href="__STATIC__/admin/uploadify/uploadify.css" /}
{/block}
{block name="js"}
{include file="public/_validform"}
<!--上传配置 -->
<script src="__STATIC__/admin/uploadify/jquery.uploadify.min.js" type="text/javascript"></script>
<script src="__STATIC__/admin/js/upfile.js" type="text/javascript"></script>

<!-- 配置文件 -->
<script type="text/javascript" src="__STATIC__/admin/hui/lib/ueditor/1.4.3/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="__STATIC__/admin/hui/lib/ueditor/1.4.3/ueditor.all.js"></script>

<script type="text/javascript">
    var ue = UE.getEditor('editor',{
        toolbars: [
            ['bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc']
        ],
        initialFrameHeight:150,
    });
    var URL = {
            uploader: '{:url('Upload/logo')}',
            swf:'__STATIC__/admin/uploadify/uploadify.swf',
            ROOT:'__ROOT__/uploads/image',
    }
    upload_image('image','','277','50');
    upload_image('code','','152','152');
    upload_image('ICO','*.ico','20','20');
</script>
{/block}

{block name="main"}
<article class="page-container">
    
    <form class="form form-horizontal" action="{:url('System/save')}" id="form" method="post">
        
        <table class="table table-border table-bordered table-bg mt-20 table-style">
            <thead>
                <tr>
                    <th colspan="2" scope="col">填写信息</th>
                </tr>
            </thead>
            
            <tbody>
                <tr>
                    <th>
                        <span class="c-red">*</span>网站名称：
                    </th>
                    <td>
                        <input type="text" class="input-text" value="{$data.title.value ?? ''}" placeholder="控制在25个字、50个字节以内" datatype="*"  name="title">
                    </td>
                </tr>
                
                <tr>
                    <th>
                        全国咨询热线：
                    </th>
                    <td>
                        <input type="text" class="input-text" value="{$data.advisory.value ?? ''}" placeholder="" name="advisory">
                    </td>
                </tr>
                
                <tr>
                    <th>
                        网站LOGO：
                    </th>
                    <td>
                        <div id="image_s">
                            <img src="__ROOT__/uploads/{$data.LOGO.value ?'image/'.$data.LOGO.value: 'sm_nopic.jpg'}" width="277px"/>
                        </div>
                        <input name="LOGO" id="image_post" type="hidden" value="{$data.LOGO.value ?: ''}"/>
                        <input id="image" name="image_upload" type="file" multiple="true">
                    </td>
                </tr>
                
                <tr>
                    <th>
                        地址栏图标：
                    </th>
                    <td>
                        <div id="ICO_s">
                            <img src="__ROOT__/uploads/{$data.ICO.value ?'image/'.$data.ICO.value: 'sm_nopic.jpg'}" width="20px" height="20px"/>
                        </div>
                        <input name="ICO" id="ICO_post" type="hidden" value="{$data.ICO.value ?: ''}"/>
                        <input id="ICO" name="ICO_upload" type="file" multiple="true">
                    </td>
                </tr>
                
                <tr>
                    <th>
                        网站网址：
                    </th>
                    <td>
                        <input type="text" class="input-text" value="{$data.localhost.value ?? ''}" placeholder="{:\\think\\Request::instance()->domain()}" name="localhost">
                    </td>
                </tr>
                
                <tr>
                    <th>
                        <span class="c-red">*</span>网站关键词：
                    </th>
                    <td>
                        <input type="text" class="input-text" value="{$data.keywords.value ?? ''}" placeholder="5个左右,8汉字以内,用英文,隔开" datatype="*" name="keywords">
                    </td>
                </tr>
                
                <tr>
                    <th>
                        <span class="c-red">*</span>网站描述：
                    </th>
                    <td>
                        <textarea name="description" cols="" rows="" class="textarea" placeholder="说点什么...最少输入10个字符" datatype="*10-100" onKeyUp="$.Huitextarealength(this,200)">{$data.description.value ?? ''}</textarea>
                    </td>
                </tr>
                
                <tr>
                    <th class="th-ge" colspan="2" scope="col">底部信息设置（显示在网站前台底部）</th>
                </tr>
                
                <tr>
                    <th>
                        二维码：
                    </th>
                    <td>
                        <div id="code_s">
                            <img src="__ROOT__/uploads/{$data.code.value ?'image/'.$data.code.value: 'sm_nopic.jpg'}" width="152px" height="152px"/>
                        </div>
                        <input name="code" id="code_post" type="hidden" value="{$data.code.value ?: ''}"/>
                        <input id="code" name="code_upload" type="file" multiple="true">
                    </td>
                </tr>
                
                <tr>
                    <th>
                        底部信息：
                    </th>
                    <td>
                        <script id="editor" type="text/plain" name="count" style="width:100%;height:400px;">{$data.count.value|default=''|html_entity_decode ?? ''}</script>
                    </td>
                </tr>
            </tbody>
            
            <tfoot>
                <tr>
                    <th></th>
                    <td>
                        <input name="type" value="{$data.foottel.type ?? 'System'}" type="hidden"/>
                        <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
                        <button onClick="layer_close();" class="btn btn-default radius" type="button">
                            &nbsp;&nbsp;取消&nbsp;&nbsp;
                        </button>
                    </td>
                </tr>
            </tfoot>
            
        </table>
        
    </form>
    
</article>
{/block}

